package com.unknowpupil.eth.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.File;

/**
 * @Classname: EthProperties
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/1/3 16:57
 * @Description: eth 配置
 * @Version: 1.0
 */
@Data
@Component
@ConfigurationProperties(prefix = "eth.configs")
public class EthProperties {
    /**
     * eth 节点url
     */
    private String url;
    /**
     * eth 中心地址
     */
    private String eth_center_address;
    /**
     * eth 难度
     */
    private Integer gas_limit;
    /**
     * eth 汽油费
     */
    private Double gas_price;
    /**
     * 钱包文件地址
     */
    private String address;

    public final File getFile() {
        return new File(this.getAddress());
    }
}
